<template>
  <view class="parking-map-container">
    <web-view :src="'/hybrid/html/parking_map.html?token=' + token.get()" @message="onGetMessage" @onPostMessage="onGetMessage"></web-view>
  </view>
</template>
<script lang="ts">
import { token } from '@/util/storage';
import Vue from 'vue';
export default Vue.extend({
	computed: {
		token: () => token
	},
	mounted() {
		if (!token.get()) {
			uni.redirectTo({
				url: "/pages/login/index"
			});
		}
	},
	methods: {
		onGetMessage(event: any) {
			console.log(123123123, event.detail.data[0].tabName);
			this.$emit("changeTab", event.detail.data[0].tabName);
		}
	}
})
</script>
<style>
</style>